﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DesignExamViewerView.aspx.cs" Inherits="Skynet.WebSite.Administration.DesignExamViewerView" %>
<%@ Register Assembly="Infrastructure.Web" Namespace="Infrastructure.Web.Controls" TagPrefix="cc2"   %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            height: 17px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AjaxContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <table class="style1">
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <h1>Question </h1>
                </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                Exam Title</td>
            <td>
                <asp:Label ID="lblExamTitle" runat="server" Text="Label"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <asp:LinkButton ID="lbQuestions" runat="server" onclick="lbQuestions_Click">Questions</asp:LinkButton>
            </td>
            <td>
                <asp:LinkButton ID="lbNewQuestion" runat="server" onclick="lbNewQuestion_Click">New Question</asp:LinkButton>
            &nbsp;
                <asp:LinkButton ID="lbNewAlternative" runat="server" 
                    onclick="lbNewAlternative_Click">New Alternative</asp:LinkButton>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                Category</td>
            <td>
                <asp:TextBox ID="txtCategory" runat="server" Width="426px"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                Title</td>
            <td>
                <asp:TextBox ID="txtTitle" runat="server" TextMode="MultiLine" Width="429px"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                Question Type</td>
            <td>
                <asp:DropDownList ID="ddlQuestionType" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="ddlQuestionType_SelectedIndexChanged">
                    <asp:ListItem Value="TextQuestion">Text Question</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="3">
                Enter values for your questions, press new alternative to add alternatives</td>
        </tr>
        <tr>
            <td class="style2" colspan="3">
                <asp:Panel ID="pnQuestion" runat="server">
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td colspan="3">
&nbsp;<asp:GridView ID="gvAlternatives" runat="server" AutoGenerateColumns="False" 
                    DataKeyNames="Id" DataSourceID="odsAlternatives" 
                    onselectedindexchanged="GridView1_SelectedIndexChanged" Width="100%">
                    <Columns>
                        <asp:CommandField ShowSelectButton="True" />                        
                        <cc2:DynamicBoundField DataField="Alternative"  HeaderText="Alternative"></cc2:DynamicBoundField>
                    </Columns>
                </asp:GridView>
                <asp:ObjectDataSource ID="odsAlternatives" runat="server" 
                    OldValuesParameterFormatString="original_{0}" SelectMethod="GetAlternatives" 
                    TypeName="Skynet.WebAdministracion.Views.DesignExamViewer.DesignExamViewerPresenter">
                </asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
